import { get, post } from '../utils/request';

// 团长中心信息
export const getTeamInfo = (data?: Recordable) => {
  return post('api.auth.live/communityCenter', {}, { loading: false });
};

// 生成小程序二维码
export const getQrcode = (data?: Recordable) => {
  return post('api.wxapp/qrcode', data, { loading: false });
};

// 直播观看记录

export const getLiveLog = (data?: Recordable) => {
  return post('api.auth.live/communityUserListc', data, { loading: true });
};

// 昨日观看记录
export const getYesterdayLiveLog = (data?: Recordable) => {
  return post('api.auth.live/communityUserListb', data, { loading: true });
}

// 会员管理
export const getUserList = (data?: Recordable) => {
  return post('api.auth.live/communityUserList', data, { loading: true });
}

// 禁用红包
export const setUserRed = (data?: Recordable) => {
  return post('api.auth.teamLive/setUserRed', data, { loading: true });
}

// 设置店员
export const setUserShop = (data?: Recordable) => {
  return post('api.auth.live/setClerk', data, { loading: true });
}

// 删除用户
export const delUser = (data?: Recordable) => {
  return post('api.auth.live/communityDelUser', data, { loading: true });
}

// 修改用户状态
export const setUserStatus = (data?: Recordable) => {
  return post('api.auth.live/communityUserStatus', data, { loading: true });
}

// 审核列表
export const getAuditList = (data?: Recordable) => {
  return post('api.auth.TeamRegister/getUserRegisterList', data, { loading: true });
}

// 审核通过
export const auditPass = (data?: Recordable) => {
  return post('api.auth.TeamRegister/userRegisterAuto', data, { loading: true });
}

// 批量审核
export const batchAudit = (data?: Recordable) => {
  return post('api.auth.TeamRegister/batchUserRegisterAuto', data, { loading: true });
}

// 观看记录
export const getWatchLog = (data?: Recordable) => {
  return post('api.auth.teamLive/userRoomDetailRedList', data, { loading: true });
}

// 红包列表
export const getRedPacketList = (data?: Recordable) => {
  return post('api.auth.center/balance3List', data, { loading: true });
}

// 修改红包发放金额
export const setRedPacketMoney = (data?: Recordable) => {
  return post('api.auth.center/setRedPrice', data, { loading: true });
}

// 充值
export const recharge = (data?: Recordable) => {
  return post('api.auth.live/recharge', data, { loading: true });
}

// 充值记录
export const getRechargeList = (data?: Recordable) => {
  return post('api.auth.RechargeWithdraw/rechargeLog', data, { loading: true });
}

// 充值申请退款
export const rechargeRefund = (data?: Recordable) => {
  return post('api.auth.RechargeWithdraw/refundSubmit', data, { loading: true });
}

// 退款记录
export const getRefundList = (data?: Recordable) => {
  return post('api.auth.RechargeWithdraw/refundLog', data, { loading: true });
}

// 直播间列表
export const getLiveList = (data?: Recordable) => {
  return post('api.auth.TeamLive/teamRoomList', data, { loading: true });
}

// 数据导出
export const exportData = (data?: Recordable) => {
  return post('api.auth.TeamLive/timeExport', data, { loading: true });
}

// 导出数据删除
export const delExportData = (data?: Recordable) => {
  return post('api.auth.TeamLive/exportFileDel', data, { loading: true });
}

// 导出数据下载列表
export const getExportDataList = (data?: Recordable) => {
  return post('api.auth.TeamLive/exportFileIndex', data, { loading: true });
}

// 团长补发红包
export const sendRedPacket = (data?: Recordable) => {
  return post('api.auth.teamLive/reissueRoomRed', data, { loading: true });
}

// 直播间详情
export const getLiveDetail = (data?: Recordable) => {
  return post('api.auth.TeamLive/teamRoomDetailRedList', data, { loading: true });
}

// 编辑自提点
export const communityEditAddress = (data?: Recordable) => {
  return post('api.auth.live/communityEditAddress', data, { loading: true });
}

// 申请团长信息
export const communityInfo = (data?: Recordable) => {
  return post('api.auth.live/communityInfo', data, { loading: true });
}

// 申请团长
export const communityApply = (data?: Recordable) => {
  return post('api.auth.live/communityApply', data, { loading: true });
}

// 投诉
export const complain = (data?: Recordable) => {
  return post('api.auth.live/complain', data, { loading: true });
}

export default {
  getTeamInfo,
  getQrcode,
  getLiveLog,
  getYesterdayLiveLog,
  getUserList,
  setUserRed,
  setUserShop,
  delUser,
  setUserStatus,
  getAuditList,
  auditPass,
  batchAudit,
  getWatchLog,
  getRedPacketList,
  setRedPacketMoney,
  recharge,
  getRechargeList,
  rechargeRefund,
  getRefundList,
  getLiveList,
  exportData,
  delExportData,
  getExportDataList,
  sendRedPacket,
  getLiveDetail,
  communityEditAddress,
  communityInfo,
  communityApply,
  complain
}

